using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SpaceDesigner
{
    public partial class NewPictureFrm : Form
    {
        #region Properties

        public string Title
        {
            get { return titleTextBox.Text; }
        }

        public int PictureWidth
        {
            get { return Convert.ToInt32(widthUpDown.Value);}
        }

        public int PictureHeight
        {
            get { return Convert.ToInt32(heightUpDown.Value); }
        }

        public Color BackgroundColor
        {
            get { return Color.FromArgb(Convert.ToInt32(RedUpDown.Value), Convert.ToInt32(GreenUpDown.Value), Convert.ToInt32(BlueUpDown.Value)); }
        }

        public string StarPatternFile
        {
            get { return starPatternTextBox.Text; }
        }

        public int StarCount
        {
            get { return (int)starCountNumericUpDown.Value; }
        }

        public string CloudPatternFile
        {
            get { return cloudPatternTextBox.Text; }
        }

        #endregion

        #region Construction/destruction

        public NewPictureFrm()
        {
            InitializeComponent();
        }

        #endregion

        #region Events Handlers

        private void starPaternButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Images (*.png)|*.png";

            if(DialogResult.OK == ofd.ShowDialog())
            {
                starPatternTextBox.Text = ofd.FileName;
            }
        }

        private void cloudPatternButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Images (*.png)|*.png";

            if (DialogResult.OK == ofd.ShowDialog())
            {
                cloudPatternTextBox.Text = ofd.FileName;
            }
        }

        #endregion
    }
}